package bz.ziro.kanbe.controller.mng.listdata;

import java.util.logging.Logger;
import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;

import bz.ziro.kanbe.dao.SiteListDataDao;
import bz.ziro.kanbe.model.SiteListData;

/**
 * リストデータのスキーマ部分を取得
 * @author Administrator
 */
public class XmlController extends Controller {

    @SuppressWarnings("unused")
    private static final Logger logger = Logger.getLogger(XmlController.class.getName());

    @Override
    public Navigation run() {

        String ownerBuf = param("ownerKey");
        String keyBuf = param("listDataKey");

        //リストデータを取得
        SiteListData data = SiteListDataDao.find(Long.valueOf(ownerBuf),Long.valueOf(keyBuf));
        //XMLをデータとして設定
        requestScope("xml",data.getData());
        return forward("xml.jsp");
    }
}
